<template>
  <div class="son">
    <h3>son组件--{{ car.name }}</h3>
  </div>
</template>

<script setup>
import { inject } from 'vue'

let car = inject('car')
</script>

<style>
  .son {
    height: 100%;
    width: 100%;
    background-color: wheat;
  }
</style>